#!/usr/bin/fish
#UFUNCTION=打开gitee(码云)
function gitee
    set cnt (ps -ef |grep firefox |grep -v "grep" |wc -lc)
    set cnt (echo $cnt | awk '{print $1}')
    echo "当前运行的火狐浏览器数量为:$cnt"
    #检测火狐浏览器是否打开，没打开则先打开
    if test $cnt -eq 0
        firefox
    end

    if test -z $argv[1]
        open https://gitee.com/
    else if test $argv[1] = "-help"
        echo "  该指令将会在默认浏览器中打开gitee。"
    end
end

